package com.niit;

public class TestGeneic {

    public Object sayHello2(Object obj){
        System.out.println("Hello from sayHello:"+obj);
        return obj;
    }
    public <T> T sayHello(T t){
        System.out.println("Hello from sayHello:"+t);
        return t;
    }

    public static void main(String[] args) {
        TestGeneic testGeneic = new TestGeneic();
        testGeneic.sayHello("niit");
        testGeneic.sayHello(123);
        testGeneic.sayHello(2.5);
    }
}
